home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
BARNET
/
ARMLINUX
/
MAIL
/
9805
/
000182_P.C.F.Norman@exeter.ac.uk _Tue May 26 13:30:49 1998.msg
< prev
next >
Wrap
Internet Message Format
|
1998-06-02
|
4KB
Return-Path: <P.C.F.Norman@exeter.ac.uk>
Received: from exeter.ac.uk (hermes.ex.ac.uk [144.173.6.14])
by odie.barnet.ac.uk (8.8.6/8.8.6) with ESMTP id NAA21454
for <willy@odie.barnet.ac.uk>; Tue, 26 May 1998 13:30:48 +0100
Received: from hebe [144.173.6.23] by hermes via SMTP (NAA17320); Tue, 26 May 1998 13:31:05 +0100 (BST)
Date: Tue, 26 May 1998 13:31:05 +0100 (BST)
From: Phil Norman <P.C.F.Norman@exeter.ac.uk>
X-Sender: py95pcfn@hebe
To: Matthew Wilcox <willy@odie.barnet.ac.uk>
cc: dooby <dooby@BITS.bris.ac.uk>, linux-arm@vger.rutgers.edu
Subject: Re: Loadmap and Filecore problems on an A5000
In-Reply-To: <199805261143.MAA21348@odie.barnet.ac.uk>
Message-ID: <Pine.SGI.3.91.980526132046.18866C-100000@hebe>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: RO
On Tue, 26 May 1998, Matthew Wilcox wrote:
> Not really. You could reformat the filecore and put a new linux partition
> in below the linux table. Maybe. I wouldn't like to try it though.
> What you can do is boot with -bootkernel and then specify `root=/dev/hda3
> ro' Maybe I'll rewrite some of the documentation post-exams to make this
> more clear. (And reread other bits of it so I understand some of the
> options I don't use.. my hazy memory tells me it should be possible to
> boot with a kernel somewhere else without having to enter those extra
> options elsewhere..)
There is a way to hack the bootloader so it automatically assumes what
extra arguments you want it to assume. I did it to mine in the following
manner:
1: Ran the bootloader through the debugger and got it to decompress
itself, and then used the *command thing from the debugger's main menu to
*save the now-decompressed !RunImage (*save $.foo 8000 <whatever the
final address in the current wimpslot is> - use the debugger's window to
scroll down to the end if application memory to find this out).
2: Load the decompressed !RunImage into your favourite text editor
and clip as much of the end off as you feel safe clipping (most of the
wimpslot you saved will be data or random garbage, which can be safely
removed without changing the way the program runs).
3: With your newly-shortened, decompressed !RI still in the text
editor, search for the instruction (you'll have to be in disassembly mode
to do this) OS_ReadLine and replace it with a branch to the end of the
binary, where you should insert the following:
STMDB r13!,{r0-r8,r14}
ADR r1,foo
LDMIA r1,{r2-r5}
STMIA r0,{r2-r5}
LDMIA r13!,{r0-r8,pc}^
.foo
EQUS "root=/dev/hda3"+CHR$10
ALIGN
Now, running the bootloader with "-bootkernel
ADFS::4.$.ARMLinux.kernels.wibble" should automatically assume that
/dev/hda3 is the root partition. The operation of the program will be
exactly as if you had typed "root=/dev/hda3" at the prompt yourself.
SANITY WARNING: DO NOT attempt this unless you are confident with
hacking about with binaries.
SANITY WARNING #2: KEEP A COPY OF THE ORIGINAL !RunImage!!!
However, if you do know what you're doing and hack it correctly, it
should work fine. Mine currently works like a dream, and I've even got
an alias set up so all I have to do to boot into linux is to type *linux
at the command prompt :-).
Enjoy your hacking should you feel up to it,
Phil
--
Rule of programming #3: The number of bugs which exist in a program is
equal to the square of the number of bugs which you think exist.
Phil Norman, mailing from Exeter University.
email: forrey@eh.org
URL: http://newton.ex.ac.uk/general/ug/norman